import { defineStore } from 'pinia';

export const useViewer = defineStore('mainViewer', {
  state() {
    return {
      _viewer: undefined
    };
  },
  getters: {
    viewer(state) {
      return state._viewer;
    }
  },
  actions: {
    setViewer(viewer: any) {
      this._viewer = viewer;
    }
  }
});

export const useDrawcontrol = defineStore('drawcontrol', {
  state() {
    return {
      _drawcontrol: undefined
    };
  },
  getters: {
    drawcontrol(state) {
      return state._drawcontrol;
    }
  },
  actions: {
    setDrawcontrol(drawcontrol: any) {
      this._drawcontrol = drawcontrol;
    }
  }
});
